package cn.wolfcode.mongodb.domain;

import lombok.Data;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

@Data
@Document("users")//设置文档在数据库中的位置
public class User {

    @Id
    private ObjectId _id;
    private Long id;
    private String name;
    private Integer age;
}
